//
//  UICollectionView+Exten.swift
//  Box
//
//  Created by mn on 2025/3/28.
//
import UIKit

extension UICollectionView{
    func registerCell(_ cellType: UICollectionViewCell.Type ) {
        registerCells([cellType])
    }
    func registerCells(_ cells: [UICollectionViewCell.Type]) {
        for cell in cells {
            self.register(cell, forCellWithReuseIdentifier: String(describing: cell))
        }
    }
    func cell<T>(_ indexPath: IndexPath) -> T {
        self.dequeueReusableCell(withReuseIdentifier: String(describing: T.self),for: indexPath) as! T
    }
}
